package com.erju.utils;

import com.erju.pojo.User;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

/**
 * @Description: 分页工具类
 * @author: erju
 * @date: 2022.05.26
 */
@Slf4j
public class PageHrlperUtils {
    private static PageHrlperUtils pageHrlperUtils = new PageHrlperUtils();
    private static int PAGENUM = 1;
    private static int PAGESIZE = 10;
    private PageHrlperUtils(){

    }
    public static PageHrlperUtils getPageHrlperUtils(){
        return pageHrlperUtils;
    }
    public static Result PageResult(List<?> list,String msg){
        PageInfo<T> UserPageInfo = new PageInfo(list);
        return Result.success(msg, UserPageInfo);
    }
}
